var base = require('../../utils/base.js')
var app = getApp()
var page = 1

Page({
  data: {
    list: {},
  },
  onReady: function () {
    
    this.loadData()
  },
  //下拉刷新
  onPullDownRefresh: function () {

    this.loadData()

  },
  loadData(status) {
    if (status) {
      page++
    } else {
      page = 1
    }
    var that = this
    base.getJson('Article/articleLists', { row: page * 10}, function (data) {
      console.log(data)
      that.setData({
        list: data.article
      })
      page += 1
    })

  },
  onReachBottom: function () {
    this.loadData(1)
  },
  //设置分享
  onShareAppMessage: function () {
    return {
      title: '每日最新舞蹈视频尽在酱游舞蹈',
      desc: '每日最新舞蹈视频',
      path: '/pages/video/videoList'
    }
  }
})